import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const Classify = () => import("../views/Classify/Classify.vue");
const Shopcar = () => import("../views/Shopcar/Shopcar.vue");
const User = () => import("../views/User/User.vue");
const Search = () => import("../views/Search/Search.vue");
const Details = () => import("..//components/Details/Details.vue");
import Home from "../views/Home/Home.vue";
const routes = [
  {
    path: "/Home",
    name: "Home",
    component: Home,
  },
  {
    path: "/Classify",
    name: "Classify",
    component: Classify,
  },
  {
    path: "/Shopcar",
    name: "Shopcar",
    component: Shopcar,
  },
  {
    path: "/User",
    name: "User",
    component: User,
  },
  {
    path: "/Search",
    name: "Search",
    component: Search,
  },
  {
    path: "/Details",
    name: "Details",
    component: Details,
  },
  {
    path: "/",
    redirect: "/Home",
  },
];

const router = new VueRouter({
  routes,
});

export default router;
